using MicroMsg.Resource.@string;
using Microsoft.Phone.Controls;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace MicroMsg.UI.UserContrl
{
	public class AddPeopleButton : Button
	{
		private bool bIsDelBtn;
		private Image image_0;
		private TextBlock text;
		private bool _contentLoaded;
		public AddPeopleButton() : this(false)
		{
		}
		public AddPeopleButton(bool isDel = false)
		{
			this.InitializeComponent();
			base.SetValue(TiltEffect.IsTiltEnabledProperty, true);
			this.bIsDelBtn = isDel;
		}
		public override void OnApplyTemplate()
		{
			base.OnApplyTemplate();
			this.image_0 = (base.GetTemplateChild("img") as Image);
			this.text = (base.GetTemplateChild("text") as TextBlock);
			this.RefreshUI();
		}
		private void RefreshUI()
		{
			if (!this.bIsDelBtn)
			{
				this.image_0.set_Source(new ImageSourceConverter().ConvertFromString("/Resource/Img/Chat/addpeople.png") as ImageSource);
				this.text.set_Text(strings.ChatAddPeopleBtnTitle);
				return;
			}
			this.image_0.set_Source(new ImageSourceConverter().ConvertFromString("/Resource/Img/Chat/delpeople.png") as ImageSource);
			this.text.set_Text(strings.ChatDelPeopleBtnTitle);
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/Chat/ChatRoom/AddPeopleButton.xaml", 2));
		}
	}
}
